/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: liangyuanzhang
 * Date: 2025-2-09
 * Time: 21:04
 */

public class Test {

    public static void drawMap(Shape shape){//多态
        shape.draw();
    }

    public static void main(String[] args) {

        Cycle cycle = new Cycle();
        Triangle triangle = new Triangle();
        Rect rect =new Rect();

        drawMap(cycle);
        drawMap(triangle);
        drawMap(rect);

    }
}
